import request from '@/utils/request'

export function query(data) {
  return request({
    // url: `/md/sfc/wipData`,
    url: `/md/sfc/wipData`,
    method: 'post',
    data
  })
}

export function wipExport(data) {
  return request({
    url: `/md/sfc/export`,
    responseType: 'blob',
    method: 'post',
    data
  })
}

// wipV2查询
export function queryOrderInfo(data) {
  return request({
    url: `/report/shopOrderTrack/query`,
    method: 'post',
    data
  })
}

// 工单异常监测查询
export function orderStateQuery(data) {
  return request({
    //baseURL:'',
    //url: `http://localhost:20000/shopOrderTrack/orderStateQuery`,
    url: `/report/shopOrderTrack/orderStateQuery`,
    method: 'post',
    data
  })
}

// 车间违规监测查询
export function workShopIrregularQuery(data) {
  return request({
    //baseURL:'',
    //url: `http://localhost:20000/shopOrderTrack/workShopIrregularQuery`,
    url: `/report/shopOrderTrack/workShopIrregularQuery`,
    method: 'post',
    data
  })
}

//车间员工绩效
export function workShopUserPerformanceQuery(data) {
  return request({
    //baseURL:'',
    //url: `http://localhost:20000/shopOrderTrack/workShopUserPerformanceQuery`,
    url: `/report/shopOrderTrack/workShopUserPerformanceQuery`,
    method: 'post',
    data
  })
}

// 导出
export function exportWip(data) {
  return request({
    url: `/report/shopOrderTrack/export`,
    responseType: 'blob',
    method: 'post',
    data
  })
}

// 员工日产能报表
export function listStaffDailyEnergy(data) {
  return request({
    url: `/report/sfcWipLogReport/listStaffDailyEnergy`,
    method: 'post',
    data
  })
}

// 员工日产能加工数汇总
export function sumStaffDailyEnergy(data) {
  return request({
    url: `/report/sfcWipLogReport/sumStaffDailyEnergy`,
    method: 'post',
    data
  })
}

// 员工日产能安灯明细
export function staffDailyEnergyAndonDetails(data) {
  return request({
    url: `/report/sfcWipLogReport/staffDailyEnergyAndonDetails`,
    method: 'post',
    data
  })
}

// 员工日产能加工明细
export function staffDailyEnergyMachiningDetails(data) {
  return request({
    url: `/report/sfcWipLogReport/staffDailyEnergyMachiningDetails`,
    method: 'post',
    data
  })
}

// 计划达成报表
export function planReachedReport(data) {
  return request({
    // url: `http://localhost:20000/sfcWipLogReport/planReachedReport`,
    url: `/report/sfcWipLogReport/planReachedReport`,
    method: 'post',
    data
  })
}

// 计划达成报表工单明细
export function planReachedOrderDetails(data) {
  return request({
    url: `/report/sfcWipLogReport/planReachedOrderDetails`,
    method: 'post',
    data
  })
}

// 计划达成报表在制明细
export function planReachedMakingDetails(data) {
  return request({
    url: `/report/sfcWipLogReport/planReachedMakingDetails`,
    method: 'post',
    data
  })
}

// 车间工单投入产出报表
export function queryShopOrderInfo(data) {
  return request({
    url: `/report/shopOrderTrack/queryShopOrderInfo`,
    method: 'post',
    data
  })
}

// 员工计件报表
export function userPieceInfo(data) {
  return request({
    //baseURL:'',
    //url: `http://localhost:20000/sfcWipLogReport/userPieceInfo`,
    url: `/report/sfcWipLogReport/userPieceInfo`,
    method: 'post',
    data
  })
}

// 员工计件导出
export function exportPiece(data) {
  return request({
    url: `/report/sfcWipLogReport/exportPiece`,
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 员工计件导出
export function excelUserPiece(data) {
  return request({
    url: `/report/sfcWipLogReport/excelUserPiece`,
    //url: `http://localhost:20000/sfcWipLogReport/excelUserPiece`,
    method: 'post',
    responseType: 'blob',
    data
  })
}
